import { createRouter, createWebHistory } from 'vue-router'
import VehicleMonitor from '@/views/VehicleMonitor.vue'
import AnomalyDetection from '@/views/AnomalyDetection.vue'
import ChargingPriority from '@/views/ChargingPriority.vue'
import LoadBalance from '@/views/LoadBalance.vue'

const routes = [
  {
    path: '/',
    redirect: '/monitor'
  },
  {
    path: '/monitor',
    name: 'monitor',
    component: VehicleMonitor,
    meta: { title: '车辆状态监测' }
  },
  {
    path: '/anomaly',
    name: 'anomaly',
    component: AnomalyDetection,
    meta: { title: '异常热工况识别' }
  },
  {
    path: '/priority',
    name: 'priority',
    component: ChargingPriority,
    meta: { title: '充电调度优先级' }
  },
  {
    path: '/balance',
    name: 'balance',
    component: LoadBalance,
    meta: { title: '充电桩负荷与缓冲空间' }
  }
]

const router = createRouter({
  history: createWebHistory(),
  routes
})

export default router